// <copyright file="LineChart.aspx.cs" company="YUIAsp.Net">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>raul popescu</author>
// <email>dev@yuiasp.net</email>
// <date>2009-01-30</date>
// <summary>YUIAsp.Net File</summary>

using System;
using YUIAspNet;

namespace YUIAspNetDemo.Charts
{
    public partial class LineChart : BaseDemoPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LocalDataSource src = new LocalDataSource();

            src.AddColumn("month");
            src.AddColumn("rent");
            src.AddColumn("utilities");
            src.AddColumn("other");

            src.AddRow("month 1", "250", "121", "0");
            src.AddRow("month 2", "500", "132", "300");
            src.AddRow("month 3", "600", "143", "500");
            src.AddRow("month 4", "800", "154", "799");
            
            this.chart.Source = src;

            this.chart.YAxis = new NumericAxis { Maximum = 1000, Minimum = 100, AlwaysShowZero=true, Format="RON {0}"};

            //this.chart.XAxis = new CategoryAxis { };// CategoryNames = new string[] { "month 1", "month 2", "month 3", "month 4" } }; 
        }
    }
}
